#include <pthread.h>
#include "adp_env.h"
#include "adp_task.h"
#include "encode.h"


static void creat_pthread(void (*pfunc)(void)) 
{
    pthread_t threads;
	long t=0;
	if (pthread_create(&threads, NULL, pfunc, (void *)t)){
		puts(__func__);
		exit(-1);
	}
}

static void creat_pgNet_pthread(void)
{
    creat_pthread(adp_pg_task);
}

void *adp_task(void *param)
{
	creat_pgNet_pthread();
    creat_task_encoder();
    //while(1) {sleep(1);}
    
    sys_log("ipadp初始化完成");
    printf("ipadp初始化完成\n");
    /*run mian task*/
    adp_cmd_task(NULL);
	return 0;
}


void adp_task_start(void)
{
    creat_pthread(adp_task);
	return 0;
}







